package com.zuoye.day10;

public class Work1 {
    public boolean anagram(String s,String t){
        if ((s.length() == t.length()) || (s.equals(t))){
            return false;
        }
        int[] nums = new int[26];
        for (int i = 0;i < s.length();i++){
            if (i >= 97 && i<= 122)
                nums[i-97]++;
        }
        for (int i = 0;i <t.length();i++){
            if (nums[i-97] == 0){
                return false;
            }
            nums[i-97]--;

        }
        return true;
    }


}


